package cn.cvs.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author: 邓必宏
 * @title:
 * @Demo:
 * @DateTime: 2023/10/30
 */
public class SpringUtil {
    public static ApplicationContext ctx;
    static {
        ctx=new ClassPathXmlApplicationContext ( "applicationContext.xml" );
    }

    public static Object getBean(String name){
        return ctx.getBean(name);
    }
}
